package com.itasura.templatemethod;

import lombok.extern.slf4j.Slf4j;

/**
 * @author sailor wang
 * @date 2018/11/21 7:26 PM
 * @description
 */
@Slf4j
public abstract class CookMethod {

    protected abstract void pourOil();

    protected abstract void heatOil();

    protected abstract void pourVegetable();

    protected abstract void pourSauce();

    protected abstract void fry();

    public void cook() {
        //第一步：倒油
        this.pourOil();
        //第二步：热油
        this.heatOil();
        //第三步：倒蔬菜
        this.pourVegetable();
        //第四步：倒调味料
        this.pourSauce();
        //第五步：翻炒
        this.fry();
    }
}